package com.szewec.ps.greenDao.dao;

import com.szewec.ps.model.DBBase;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Transient;
import org.greenrobot.greendao.annotation.Generated;

import java.util.Date;
import java.util.Objects;

@Entity
public class AlbumFile extends DBBase {
    @Id
    private String id;
    private Integer syncStatus;
    //上传到服务器端后又服务器命名
    private String name;
    private String path;
    /**
     * 关联的Id
     */
    private String relevantId;
    private String fileName;
    private String fileType;
    private String mime;
    private long duration;
    private int type;//0表示照片，1表示视频
    private String bizType;
    private String bizId;
    private String commentType;
    private Double latitude;
    private Double longitude;
    /**
     * 描述
     */
    private String description;
    /**
     *base
     */
    private String createUserId;
    private String createUserName;
    private Date createTime;
    private String modifyUserId;
    private String modifyUserName;
    private Date modifyTime;

    //用于标示是否为新增的图片，本字段不入库
    @Transient
    private boolean isAdd;

    @Generated(hash = 1778031854)
    public AlbumFile(String id, Integer syncStatus, String name, String path,
            String relevantId, String fileName, String fileType, String mime,
            long duration, int type, String bizType, String bizId,
            String commentType, Double latitude, Double longitude,
            String description, String createUserId, String createUserName,
            Date createTime, String modifyUserId, String modifyUserName,
            Date modifyTime) {
        this.id = id;
        this.syncStatus = syncStatus;
        this.name = name;
        this.path = path;
        this.relevantId = relevantId;
        this.fileName = fileName;
        this.fileType = fileType;
        this.mime = mime;
        this.duration = duration;
        this.type = type;
        this.bizType = bizType;
        this.bizId = bizId;
        this.commentType = commentType;
        this.latitude = latitude;
        this.longitude = longitude;
        this.description = description;
        this.createUserId = createUserId;
        this.createUserName = createUserName;
        this.createTime = createTime;
        this.modifyUserId = modifyUserId;
        this.modifyUserName = modifyUserName;
        this.modifyTime = modifyTime;
    }

    @Generated(hash = 2044116480)
    public AlbumFile() {
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    @Override
    public Integer getSyncStatus() {
        return syncStatus;
    }

    @Override
    public void setSyncStatus(Integer syncStatus) {
        this.syncStatus = syncStatus;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getRelevantId() {
        return relevantId;
    }

    public void setRelevantId(String relevantId) {
        this.relevantId = relevantId;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public String getMime() {
        return mime;
    }

    public void setMime(String mime) {
        this.mime = mime;
    }

    public long getDuration() {
        return duration;
    }

    public void setDuration(long duration) {
        this.duration = duration;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getBizType() {
        return bizType;
    }

    public void setBizType(String bizType) {
        this.bizType = bizType;
    }

    public String getBizId() {
        return bizId;
    }

    public void setBizId(String bizId) {
        this.bizId = bizId;
    }

    public String getCommentType() {
        return commentType;
    }

    public void setCommentType(String commentType) {
        this.commentType = commentType;
    }

    public Double getLatitude() {
        return latitude;
    }

    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }

    public Double getLongitude() {
        return longitude;
    }

    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    public boolean isAdd() {
        return isAdd;
    }

    public void setAdd(boolean add) {
        isAdd = add;
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    @Override
    public String getCreateUserName() {
        return createUserName;
    }

    @Override
    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getModifyUserId() {
        return modifyUserId;
    }

    public void setModifyUserId(String modifyUserId) {
        this.modifyUserId = modifyUserId;
    }

    @Override
    public void setDesignStageId(String designStageId) {

    }

    @Override
    public void setxCoordinate(Double xCoordinate) {

    }

    @Override
    public Double getxCoordinate() {
        return null;
    }

    @Override
    public void setyCoordinate(Double yCoordinate) {

    }

    @Override
    public Double getyCoordinate() {
        return null;
    }

    @Override
    public String getModifyUserName() {
        return modifyUserName;
    }

    @Override
    public void setModifyUserName(String modifyUserName) {
        this.modifyUserName = modifyUserName;
    }

    @Override
    public Date getModifyTime() {
        return modifyTime;
    }

    @Override
    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AlbumFile file = (AlbumFile) o;
        return Objects.equals(getDescription(), file.getDescription());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getDescription());
    }
}
